package com.woniu.car.common;

import java.io.FileWriter;
import java.io.IOException;

/**
 * 支付宝的配置文件
 */
public class AliPayConfig {
    // [沙箱环境]应用ID,您的APPID，收款账号既是你的APPID对应支付宝账号
    public static String app_id = "2021000117667279";
    // [沙箱环境]商户私钥，你的PKCS8格式RSA2私钥
    public static String merchant_private_key ="MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCbXbm9dC5/5c8LA61Ek2gqewuyfHhEJLsptvFMfEbvDuIQzJLsBW0RmdqyaNzsa1MFuQTBDFlljWZaqlvBnKs/GyZn6nDCgjJpqDG8KB8y4yEb3KXgp5kNyEsPjnH7T/ZRXbSKgJ8w89MqwGrk0ElDqFT5SxXp4m7iiAgu09z6d1acDhYrAWaUO8ZIUjfUZyRAXk8g9Zn91b0NTDulRpY31s5zQ0Q/9NJhO3oKOuA3w0V9gi6olzU2erHY0AmSYw0id+Nh0RfLgKnMHisG4ykTGOlqFickiQ0+XEFGlJxZ6zy7KGpxAltZtpPi8zy81zUml7b5q7uSNYhBbZrbVyjfAgMBAAECggEBAJQitlGMcDWkUVfIJrHG9r/iWFHTWfxnJUlt0/7AVAXlo+iulbuSpN7uWlZXo6WL4zoGoiDK/IXWX2w9GIWvMpxV77WPE/pxl02kf99ORgkIBO6C4GomgslgWyk3ATjEkjAcb2LLpn1PTd1qX8FRUzm+S17yl69MJbu6RksX2I+6KzEwFlLyNgFYS0yyNd332sNHnp8yXTwwFc7TrDVPBBmtF/tyPI6kehTpTSh5QQt3pwp+KhFaKVqOtNel9txCsNkaoXCexZvJFe/0qZPzew75gINf4eMW9dJEqIm/Eila+ms1ILFe3JfVE0jFNwlyZLvxHMsSKaMu+OsqUm9PfHECgYEA9OF0rIN8SKaPozzrQ5dJzldRQrOnxbmadY/tYLo3KUx9035vXiExQZgQlIkEaPteosf1Pmg3zaWZiZnNP9vqZWnEXKEnCXX9GEUJ1LAfYV5FXyqcjY9LVD2cGkoV6dXFRZMnw2CVHfU6bHGZ8wKtDCbUJOfF0DmWCtlh58IefbcCgYEAomu71RYDlTS7KEv3ajoy4tmGxDRN+IV7FnaLD17Kk4E2tzNNx74VCWVCmcE+r589NaFA/zcTczsXWDodroNKimFz53Uv5jLxHYZt/7AgBD9twX6X9N+M6T0DaT433PZB4eBe9mjzAI9C9id33AgB2KzBEHxYyLGPH13hY5JqLhkCgYAvdSYkbNMATW9W5m59yese1yNDdwfTtPWvRPZvIYehNFbKTx2MM4iVOsAz2R4GrniXuYLY1l/CNg68cRcrAha6ErZgcUbceYZUVsTh+EQMnbV6DQsMEDI8IDiJi8QVbj1uD2fMYIJlrOnmrFl2lBUvXrMMd/KJOS/P6HMl9CPunwJ/JCnYqJk+MvqKsW44qG5M5jWIzCbZNXyC6315ePKiKDWc+S1zJAYuqOji61kbm/7YohhFYI3ixsVhbUODWFfjQOxx4hc1kwvEo85Kr6OHfWqiBXMqYltkBIqRN92ikpBCGwjaHANCF93OCwC+rz8ZKiVM117YZdcjBtjgVktDWQKBgQCab0z3CJQs15yX+bCDrSj87/js7OJnW+sKz4ksC5lSVstz3m9PEEXS8XNCaTG2U7Yf5vSCaqcVPh3eI4UZYPPSxn5oeD79kHZuk0GZpX6pGhllTn/XiT+z4v0GVndb4Iih+9wN1KALwTSvz0euB7uQUTtBKOzG9UKl2zUF2WKa0A==";
    // [沙箱环境]支付宝公钥
    public static String alipay_public_key ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAms79tj10zTP1xb0MC3XME93hlgc4cYbONrAdfHX/ghMavAvgoRKIluMXR/dc2IVYnRU/YBeSPD6iusLLLk75rKyQosTy8JW18Jw7Pa9OaASUYNiG1vqO8Or5oxkNXHfRj8nSdU0bFMckPV3xq0gPyd6+n+hy59YLLxc6dGO4aMbdmq2fiC0vMFh1o8esEh0tB6uxiH2JL0DDusRCV5EzRaQeAiAbRbSoV9FBGOdfVdJl3WC0OUQZmB7cdaA8cHkoOxZzZ4/JkVrR9v+0zxIZt5hkxs085Cb0OH5fnW7jC198A0rVUXqwS2q9CCUN7xaoFIt1x7uGFOXPcms8siE+EQIDAQAB";

    // [沙箱环境]服务器异步通知页面路径
    public static String notify_url="http://ngrok.sscai.club/alipay/aliPayNotify_url";
    // [沙箱环境]页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url ="《支付成功跳转页面》";

    // [沙箱环境]
    public static String gatewayUrl ="https://openapi.alipaydev.com/gateway.do";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 日志地址
    public static String log_path = "D:/logs/";

    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_"
                    + System.currentTimeMillis() + ".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}


